#import "dfhgwhruebvhrheymournrural.h"
#import "dfhgwhruebvhrheysternideology.h"
#import "dfhgwhruebvhrheygeneralizeignore.h"
#import <YYText/YYText.h>
#import "dfhgwhruebvhrheyluggagerecorder.h"
#import "dfhgwhruebvhrheyyearlyquantifyViewController.h"
@interface dfhgwhruebvhrheyyearlyquantifyViewController ()<dhgfywegwygeydwdefinitelyleak>
@property (nonatomic, strong) dfhgwhruebvhrheymournrural *timer;
@property (nonatomic, strong) YYLabel *timeText;
@property (nonatomic, strong) dfhgwhruebvhrheygeneralizeignore *codeView;
@property (nonatomic, strong) UIButton *reacquireBtn;
@end
@implementation dfhgwhruebvhrheyyearlyquantifyViewController {
	int cut_down;
	UILabel *codeText;
	UILabel *tipsText;
	void(^_callback)(NSString *code);
}
- (dfhgwhruebvhrheymournrural *)timer {
	if (_timer == nil) {
		_timer = [[dfhgwhruebvhrheymournrural alloc] init];
	}
	return _timer;
}
- (void)viewDidLoad {
	[super viewDidLoad];
	[self loadUI];
	[self codeRequest];
}
- (void)loadUI {
}
- (void)startTimer {
	[self.timer startWithAction:^{
		dispatch_async(dispatch_get_main_queue(), ^{
			[self updateCutTime];
		});
	}];
}
- (void)updateCutTime {
	if (cut_down <= 1) {
		cut_down = dhgfywegwygeydwleakconceal;
		self.reacquireBtn.hidden = NO;
		[_timer cancel];
		_timer = nil;
        self.timeText.hidden = YES;
	}else {
		cut_down -= 1;
        self.timeText.hidden = NO;
        self.timeText.attributedText = [self timeAttribute:cut_down];
	}
}
- (void)checkCodeRequest:(NSString *)code {
}
- (void)codeRequest {
}
- (NSMutableAttributedString *)timeAttribute:(int)second {
	NSString *secondString = [NSString stringWithFormat:@"%02d",second];
	NSString *string = [NSString stringWithFormat:@"SMS will arrive in %@  seconds", secondString];
	NSMutableAttributedString *matt = [[NSMutableAttributedString alloc] initWithString:string];
	NSRange range = [string rangeOfString:secondString];
	matt.yy_alignment = NSTextAlignmentCenter;
	matt.yy_color = [UIColor whiteColor];
	[matt yy_setColor:@"#FFEB54".dhgfywegwygeydwlearneddesignate range:range];
	[matt yy_setFont:[UIFont medium:15] range:range];
	return matt;
}
- (void)getCode:(void(^)(NSString *code))callback {
	_callback = callback;
}
- (void)backAction {
	if (_timer) {
		[_timer cancel];
		_timer = nil;
	}
	[self.navigationController popViewControllerAnimated:YES];
}
- (void)viewDidLayoutSubviews {
	[super viewDidLayoutSubviews];
}
- (void)codeViewDidInputCompleted:(dfhgwhruebvhrheygeneralizeignore *)codeView {
	[self checkCodeRequest:codeView.code];
}
@end
